package de.ttf.ts.model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.OneToMany;

@Entity
public class Club extends BaseEntity<Club> {
    private static final long serialVersionUID = 1L;

    private String name;

    @OneToMany(mappedBy = "club")
    private Set<Player> players;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Set<Player> getPlayers() {
        if (players == null) {
            players = new HashSet<Player>();
        }
        return players;
    }
}
